{% extends 'qna/base.html' %}
{% load static %}

{% block head %}
<link href="{% static 'qna/css/question.css' %}" type="text/css" rel="stylesheet">
<link href="{% static 'qna/css/details.css' %}" type="text/css" rel="stylesheet">
{% endblock %}

{% block title %}
Вопрос №{{ question.id }}
{% endblock %}

{% block content %}

<div id="content">
<div class="question">
    {% spaceless %}
    <div class="top">
        <p class="titel">{{ question.titel | safe }}</p>
        <p class="name">Создана: {{ question.name }}</p>
    </div>
    <p class="text">{{ question.question|safe }}</p>
    {% endspaceless %}
</div>
<a href="new_answer/" class="add"><div class="plus"><p>Добавить ответ</p><span></span></div></a>
</div>

<div id="answers">  
    {% if answer.first %}{% for answers in answer %}
    {% spaceless %}
        <div class="answer" >
            <div class="top"><p class="name">Создана: {{ answers.name }}</p></div>
            <p class="text">{{ answers.answer|safe }}</p>
        </div>
    {% endspaceless %}
    {% endfor %}
    {% else %}
        <div class="answer"><p class="name">Создана: Аноним</p><p class="text">Пока ответов нет, будь первым!</p></div>
    {% endif %}
</div>


{% endblock %}